namespace Maple.Branch.Permissions.Providers
{
    using System.Threading.Tasks;
    using JetBrains.Annotations;
    using Models;
    using Volo.Abp.DependencyInjection;

    public interface IPermissionProvider : ISingletonDependency //TODO: Consider to remove this pre-assumption
    {
        string Name { get; }

        Task<PermissionValueProviderGrantInfo> CheckAsync(
            [NotNull] string name,
            [NotNull] string providerName,
            [NotNull] string providerKey
        );

        Task SetAsync(
            [NotNull] string name,
            [NotNull] string providerKey,
            bool isGranted
        );
    }
}
